Repository navigation
feat(spec,ui): a field can be read-only by hand at the console while writes keep it (uiReadonly / uiReadonlyWhen) - #37436
Conversation
…the dialog surfaces (WIP) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CXSuJCALDHFWaV6Bv5
…t reports uiReadonly / uiReadonlyWhen (WIP) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CXSuJCALDHFWaV6Bv5
…acts and liveness rows (WIP) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CXSuJCALDHFWaV6Bv5
…e, grid, line-item grid, kanban, calendar (WIP) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CXSuJCALDHFWaV6Bv5
…ngeset (WIP) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CXSuJCALDHFWaV6Bv5
…y / uiReadonlyWhen in the FieldSchema key censuses Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CXSuJCALDHFWaV6Bv5
…and uiReadonlyWhen, translated in every metadata-forms locale Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CXSuJCALDHFWaV6Bv5
… 837 → 839 for the two hand-lock rows Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CXSuJCALDHFWaV6Bv5
📓 Docs Drift CheckThis PR changes 7 package(s): 35 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 18 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 188 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 390517a26f3435300698f611631f9180c0de4501 && git checkout 390517a26f3435300698f611631f9180c0de4501
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 276174ab0c70804700b196d4d718268331be8120 8a1e714518c4ffe5f1541dfe031d0da9a2f016e1 && git checkout -B drift-repro 276174ab0c70804700b196d4d718268331be8120 && git merge --no-ff 8a1e714518c4ffe5f1541dfe031d0da9a2f016e1
node scripts/docs-audit/affected-docs.mjs --json 276174ab0c70804700b196d4d718268331be8120
|
|
repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS Final head for L1 + L2 · area o5-D · 2026-11-26T05:30Z |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract-review-claim: session_01Utp6CYtTDvfPQDzMbZnN5X · head 62c400a · 2026-11-26T05:31Z The seat runs the at-tier contract review of this head through an isolated sub-agent; L1 is the seat's own. |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract reviewServed-tier: Inputs read: card #36806 body and all 10 comments (analysis 7179210173, ruling 7180466652, claim 7180490513, amendments 7180683371 / 7181406682 / 7182109621 / 7182190475, os-dev-report 7183535050); PR #37436 body and its 3 comments (final-head 7183553330); the net diff ① Derived judgments
② Semver level
③ Boundary flagsDev deviations:
Escalated to the seat: ruling 7180466652 defines "by hand" to include "an in-app assistant acting for a person". The describe in SQL push-down: no finding. The diff adds no query, no id materialisation and no in-app join; the kanban and calendar reads are lookups in rows the surface already holds. ④ Design judgmentWhat holds, read against the ruling and the live tree: the static lock S1 (should-fix) — S2 (should-fix) — a faulted S3 (should-fix) — the describe says "no console surface lets a person edit the field", and four hand surfaces still do, with no server strip behind them. (a) In the diff: S4 (should-fix) — the N1 (nit) — the changeset names neither N2 (nit) — N3 (nit) — Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X 席位核对Head-sha:
|
…sed fault, lint slot, narrowed describes) Per the L1 rework and contract review on #36806: S1 host scope on every surface and lock-predicate operands fetched by the grid row load and ListView (grid columns, kanban lane, calendar dates); S2 a faulted uiReadonlyWhen locks the field, the edit form refuses to submit, os validate checks the slot; S3(a) authored line-item columns carry the child field's hand lock; S4 uiReadonlyWhen judges existing records only; describes name the honouring surfaces; N1/N2. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CXSuJCALDHFWaV6Bv5
…eadonlyWhen refusal pin check:test-source-alias: the layout renderers reach @object-ui/react-runtime through a dynamic import, so the test imports it at module top. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CXSuJCALDHFWaV6Bv5
|
repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS Final head after rework —
|
| Item | Where | Pin |
|---|---|---|
| S1 host scope on every surface | ObjectGrid / objectGridCellFacts (cell), DetailSection, HeaderHighlight, InlineEditSaveBar, recordPathStageChange, ObjectKanban, ObjectCalendar |
core handLock-36806 (current_user over scope), grid objectGridCellFacts.handLock-36806 |
| S1 operands read before the verdict | objectGridRowLoad.ts (grid's own fetch); ListView.tsx $select (shown columns, kanban groupByField, calendar start/end) |
lockOperandProjection-36806, ListView.lockOperandSelect-36806; a row missing the operand is locked (core, grid) |
| S2 fault direction | UI_READONLY_WHEN_FAULTED = true (fieldRules.ts): fail closed, no server judges the hand lock |
core (parse fault, missing operand, unbound root), faults.uiReadonlyWhen reported |
| S2 submit refusal | form.tsx: an edit form refuses with form.uiReadonlyWhenFaulted (11 ui locales + form fallback); a create never judges it |
uiReadonlyWhen-fault-refuses-submit-36806 (both evaluation paths, create control) |
| S2 lint slot | validate-expressions.ts: uiReadonlyWhen in the field-rule walk (record-scoped check + root verdict, own consequence clause); meta-test slot list |
5 lint pins |
S3(a) hydrateColumns |
withHandLock on typed and untyped authored columns; GridFieldWidget locks a static uiReadonly column |
deriveMasterDetail.test.ts, GridField.handLock-36806 |
| S3 remainder, N3 | #37448 | — |
| S4 "existing record" | field.zod.ts describe + TSDoc, liveness/field.json note, field.form.ts help (retranslated in 10 locales, generator re-run, no fill hash) |
regenerated reference docs, translations suite |
| Narrowing, N2 | both describes and describe_object name the honouring surfaces; required without defaultValue fails every console create |
— |
| N1 | changeset: metadata-core, platform-objects, lint, plugin-list, i18n |
— |
Ablations (each mutation landed on disk and was restored): fault fail-open → 6 pins red (core, grid, form); grid harvest dropped → harvest pins red; ListView harvest emptied → 3 red; form refusal off → 2 red; withHandLock static half off → 1 red; GridField static read off → 1 red; lint slot dropped → 4 red.
Local suites: ui core 4,800 · i18n 2,028 · components 4,996 · fields 5,034 · plugin-form 2,796 · plugin-grid 2,800 · plugin-list 2,075 · plugin-detail 3,970 · plugin-kanban 585 · plugin-calendar 515 · lint 9,634 · spec data 6,865 · mcp 1,512 · platform-objects translations 610. type-check green in 9 ui packages and lint.
Overlap (accepted by the area): #37422 count pin in object-lifecycle-panel-echo-decisions.test.ts; #37449 one-line union in objectGridRowLoad.ts extraFields. Whichever lands second merges main and keeps both.
Deviations: an intermediate head (309363d) went red on check:test-source-alias: the new form pin lacked the module-top @object-ui/react-runtime import. Fixed in 116e042.
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract-review-claim: session_01Utp6CYtTDvfPQDzMbZnN5X · head 116e042 · 2026-11-26T08:21Z |
|
repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS Test Core (10/10) on 73681b4: one timeout in a package this PR does not touch. The only failure is
So this reads as a load timeout, not this change. A re-run of the failed job should clear it; I can't trigger one from here. Generated by Claude Code |
|
repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS Final head after merging main —
|
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract reviewServed-tier: A whole record for this head. It stands on two earlier rounds by the same reviewer, at Range facts:
① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentThe hit files against the ruling and their consumers: S1: closed. Host scope on every surface; lock operands fetched by the grid load and S2: closed. Fault fails closed in the one evaluator; the edit form refuses the submit; S3: closed. Authored line-item columns carry the lock; the uncovered surfaces are carried on #37448 and the describes name what is covered. S4: closed. "Existing record only" in the describe, TSDoc, Studio help, ledger and changeset. S5: closed. S6: closed. The scrub serves N1: closed. N2: closed. N3: carried on #37448. N4: closed (the body says fail closed). N5: carried on #37448. N6: closed ( No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X 席位核对Head-sha:
|
|
repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS Landing — area o5-DHead-sha:
Landing with |
…mance ledger Adds the cel-field-ui-readonly-when row: the console hand lock's predicate, evaluated by the hand-lock verdict in core/evaluator, fail-closed, UI only. A row of its own rather than a cel-field-rule cover, since its evaluator, its fail policy and its reach all differ. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CXSuJCALDHFWaV6Bv5
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 45802459935 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract reviewServed-tier: A whole record for this head. It stands on three earlier rounds by the same reviewer, at Range facts:
① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentThe hit files against the ruling and their consumers: S1: closed. Host scope on every surface; lock operands fetched by the grid load and S2: closed. Fault fails closed in the one evaluator; the edit form refuses the submit; S3: closed. Authored line-item columns carry the lock; the uncovered surfaces are carried on #37448 and the describes name what is covered. S4: closed. "Existing record only" in the describe, TSDoc, Studio help, ledger and changeset. S5: closed. S6: closed. The scrub serves N1: closed. N2: closed. N3: carried on #37448. N4: closed (the body says fail closed). N5: carried on #37448. N6: closed ( The ledger row
N7 (nit) — the enforcement cell opens with N8 (nit) — No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X 席位核对Head-sha:
|
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X 席位核对Head-sha:
|
|
repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS Re-landing — area o5-DHead-sha:
Re-landing with |
Requested by Bill · project thread
repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS
Fixes #36806
Clause-②: yes
Metadata-protocol: added
Skills-docs: follow-up #37405
维护者速读
uiReadonly/uiReadonlyWhen:控制台所有手工编辑面锁住该字段,动作、导入、API、流程照常写入。uiReadonly与readonly同为 true 时被拒。@object-ui/core的fieldReadOnlyByHand;看板顺带修好:readonly分组字段此前可拖动且写入被静默丢弃。uiReadonlyWhen求值失败即锁定、编辑表单拒绝提交,os validate检查该槽;表格与列表视图取回锁谓词的操作数;描述只列出已生效的界面(其余见 uiReadonly / uiReadonlyWhen: honour the hand lock on the remaining console surfaces — Gantt drag and in-place edit, timesheet cell write, kanban swimlane drag, the in-app assistant acting for a person, and palette prefill #37448)。What changes
Ruling 7180466652 (scope items 1–6), surface per claim 7180490513 and amends 7180683371, 7181406682, amend 3 and 7182190475.
Spec (
packages/spec)Field.uiReadonly: booleanandField.uiReadonlyWhen(CEL, the same scope asreadonlyWhen), both optional with no default (absent = unlocked, so no parsed field grows a key), with describes and TSDoc.superRefinerefusesuiReadonly: truebesidereadonly: trueat['uiReadonly'](every door that parses a field).uiReadonlyWhenbesidereadonlyWhenis accepted.deriveInlineGridColumnsskips auiReadonlychild field, as it skipsreadonly.uiReadonly/uiReadonlyWhen(live); regenerated reference docs, authorable-surface record and state counts.field.form.ts) offers both rows besidereadonly/readonlyWhen(uiReadonlyWhenas a CEL code row). The label and help text of each are translated in all 11 metadata-forms locale packs (packages/platform-objects, the generator re-run after the leaf values, so no fill hash is left); the translated-leaf count pin moves 837 → 839.Console (
ui/packages/**)@object-ui/core:fieldReadOnlyByHand(def, record?, ctx?),fieldStaticallyReadOnlyByHand(def),fieldHasConditionalHandLock(def)(newevaluator/handLock.ts).resolveFieldRuleStatetakesuiReadonlyWhen(rules) anduiReadonly(statics) into itsreadonlyverdict; a faulteduiReadonlyWhenfails CLOSED (no server judges it), unlikereadonlyWhen.filterSystemFields,filterCreateModeFields,disabled) and the submitted payload (sanitize.ts); form renderer and wizard passuiReadonlyWhen; record page inline edit (DetailSection,InlineEditSaveBar,RecordDetailPanel, stage path), highlight-strip chip (HeaderHighlight), related list; grid inline edit (fieldInlineReadOnlyKind,cellReadOnlyKindnow judges the row, which the data table's paste and multi-row staging read) and the required prompt; kanban drag (cardsMovableand a refusedhandleCardMove); calendar drag (onEventDrop,endEditable, and the drop handler over the record); line-item grid (deriveMasterDetailcarriesuiReadonlyWhenonto the column;GridFieldWidgetfolds it per row); edit-form state lock (editFormLockedByState).readonly: import mapping (importTargetFields.ts), Studio/designer reads, calendar quick-create's required exemption (it mirrors the engine insert).Server
packages/objectql/**): the strip keys onreadonlyalone, so REST, import, actions and flows write a hand-locked field and the object's validations judge each write.describe_objectreportsuiReadonly/uiReadonlyWhenas their own keys where set, on HTTP (runtime/domains/mcp.ts) and stdio (mcp/mcp-server-runtime.ts); the tool description names them (mcp-http-tools.ts).driver-sqlstorage class (presentation),metadata-coreFLS reference positions (uiReadonly: keep,uiReadonlyWhen: expression),/meta/typesfield count 87 → 89.Review rework (L1 7183712080, contract record 7183704697)
usePredicateScope) tofieldReadOnlyByHand: grid cell, record page (inline edit, highlight chip, save bar, stage path), kanban drop, calendar drop. The grid's own row load (objectGridRowLoad.ts) andListView's$selectfetch the operands of thereadonlyWhen/uiReadonlyWhenof every shown column, the kanban lane field and the calendar start / end fields, through the same FLS and declared-field gates as the other harvests.uiReadonlyWhenthat cannot be evaluated (a parse error, an operand the row lacks, an unbound root) fails CLOSED (UI_READONLY_WHEN_FAULTED): no server judges the hand lock, so the field locks. The edit form refuses to submit and names the field and the rule (form.uiReadonlyWhenFaulted, all 11 ui locales).os validatechecks the slot as it checksreadonlyWhen(validate-expressions.ts: the record-scoped check plus the field-rule root verdict, with its own consequence clause).hydrateColumnscarries the child field'suiReadonly/uiReadonlyWhenonto an authored line-item column, typed or not;GridFieldWidgetlocks auiReadonlycolumn on every row. Gantt, timesheet, swimlane, the assistant and N3palettePrefillFieldare uiReadonly / uiReadonlyWhen: honour the hand lock on the remaining console surfaces — Gantt drag and in-place edit, timesheet cell write, kanban swimlane drag, the in-app assistant acting for a person, and palette prefill #37448.uiReadonlyWhenis judged on an existing record only: the describe, the liveness note and the Studio help say so (help retranslated in 10 locales, generator re-run, no fill hash).describe_objecttext name the surfaces that honour the keys;uiReadonly's describe says arequiredfield withoutdefaultValuefails every console create.metadata-core,platform-objects,lint,plugin-list,i18n.Delta rework (contract 7186595753, L1 7186604968)
uiReadonlyWhenon a stored line only (rowHasId): a new line is not judged, as the create dialog does not judge it.ObjectGridhas no inline add-record row (addRecordFormopens the create dialog), so no second site exists.metadata-core) deletes auiReadonlyWhenthat reads a field denied to the caller and now serves the fielduiReadonly: truein its place (unless it is alreadyreadonly), so the lock never opens for that caller. TheListView.tsxcomment says so.readonlyWhenon both evaluation paths. N5 (detected kanban lane field) is carried on uiReadonly / uiReadonlyWhen: honour the hand lock on the remaining console surfaces — Gantt drag and in-place edit, timesheet cell write, kanban swimlane drag, the in-app assistant acting for a person, and palette prefill #37448.Main merge and queue fix
3eb2bcf8merges main after feat(units): show a quantity with its unit label (#35490) #37449 landed and keeps both...lockOperandFieldsand...quantityUnitFieldsinextraFields.73681b48regeneratesobject.mdxfrom the merged tree.30090e73adds the expression-conformance ledger rowcel-field-ui-readonly-whenfordata/field.zod.ts:FieldSchema.uiReadonlyWhen(packages/qa/dogfood/test/expression-conformance.ledger.ts: cel, interpret, enforced, fail-closed, UI only, proofhandLock-36806.test.ts). The row was added after a merge-queue dequeue (run 45802787226), because PR-side CI does not runpackages/qa/dogfood/test/expression-conformance.test.ts. That test now passes 8 of 8 locally.Tests
packages/spec/src/data/field-ui-readonly.test.ts: parse and absence, the refusal (codecustom, path, message) at the field and object doors, controls, line-item column skip.packages/qa/dogfood/test/ui-readonly-hand-lock-36806.dogfood.test.ts(booted stack, HTTP): a PATCH to theuiReadonlyfield lands with noX-ObjectStack-Dropped-Fields(control: thereadonlysibling is stripped and advertised); thestate_machinerefuses an illegal move with status 400, codeVALIDATION_FAILEDand its own message on the PATCH, action and import doors; a create without the field lands ondefaultValue; an API create outsideinitialStatesis refused by the machine.packages/runtime/src/domains/mcp-object-hand-lock-36806.test.tsand a block inpackages/mcp/src/__tests__/mcp-server-runtime.test.ts: both keys reported only where set, never folded intoreadonly.core/evaluator/__tests__/handLock-36806.test.ts,plugin-form/__tests__/dialogHandLock-36806.test.ts,plugin-detail/__tests__/DetailSection.doubleClickEdit.test.tsx(hand-lock block),plugin-grid/objectGridCellFacts.handLock-36806.test.ts,plugin-kanban/ObjectKanban.handLock-36806.test.tsx,plugin-calendar/__tests__/ObjectCalendar.handLock-36806.test.tsx,fields/widgets/GridField.handLock-36806.test.tsx,plugin-form/deriveMasterDetail.test.ts(line-item block);typesFormField coverage list gainsuiReadonlyWhen.Acceptance notes
readonlyfield was draggable and its PATCH was silently stripped. Both locks now stop the drag.uiReadonlyis.optional(), not.default(false): absent means unlocked, and no parsed field or snapshot grows a key.extraFields; resolved in the main merge3eb2bcf8, keeping both.palettePrefillField(uiReadonly / uiReadonlyWhen: honour the hand lock on the remaining console surfaces — Gantt drag and in-place edit, timesheet cell write, kanban swimlane drag, the in-app assistant acting for a person, and palette prefill #37448); skills pages (adr: field write locks are two tiers, two forms and two levels (readonly / readonlyWhen vs uiReadonly / uiReadonlyWhen, field over object); the data skill teaches the four spellings #37405).Verification
Local, per os-dev local verification scope (CI runs the full farm):
type-checkin 10 ui packages.fieldStaticallyReadOnlyByHandwithoutuiReadonly→ 8 pins red across kanban, calendar, record page, dialogs and grid.rule-validator.ts) also strippinguiReadonly, built to dist (marker in 4 files) → 4 dogfood pins red (PATCH, the machine's refusal on PATCH, action and import); restored, rebuilt, marker absent.dispatch-gates --commands: 124 derived commands run. Reds not from this diff:check-plugin-teardown-shape --self-test(shallow clone cannot reach its pinned fixture commit),check:platform-checklist(ABSENT SYMBOLFlowItemMoreMenuin areas/automation.json; neither file is in this diff),check:dual-build-cjs-loads(prerequisite: unbuilt packages, nothing measured).type-checkgreen in 9 ui packages and lint;check:generated --fixre-checked clean.withHandLockstatic half off → 1 red; GridField static read off → 1 red; lint slot dropped → 4 red.🤖 Generated with Claude Code
https://claude.ai/code/session_01Utp6CXSuJCALDHFWaV6Bv5